<template>
  <div>
    <ul class="house-list" v-for="item in roomList" :key="item.id" @click="goDetails(item.id)">
      <li>
        <div class="left">
          <img :src="'http://liufusong.top:8080'+item.houseImg" alt />
        </div>
        <div class="right">
          <h3>{{item.title}}</h3>
          <p>{{item.desc}}</p>
          <span class="tra" v-for="item1 in item.tags" :key="item1">{{item1}}</span>
          <div class="price">
            <i class="count">{{item.price}}</i>元/月
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    roomList: Array,
  },
  data() {
    return {}
  },
  computed: {},
  created() {},
  mounted() {},
  watch: {},
  methods: {
    goDetails() {
      
    },
  },
  components: {},
}
</script>

<style scoped lang="less">
* {
  margin: 0;
  padding: 0;
}
.house-list li {
  list-style: none;
  display: flex;
  align-items: center;
  padding: 5px;
  height: 100px;
  width: 100%;
  border-bottom: 1px solid #e5e5e5;
  .left {
    width: 120px;
    height: 90px;
    // background-color: aqua;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .right {
    flex: 1;
    padding-left: 10px;
    padding-top: 10px;
    // background-color: brown;
    h3 {
      font-size: 15px;
      width: 257px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    p {
      color: #afb2b3;
      margin: 5px 0;
      font-size: 12px;
    }
    .tra {
      // height: 18px;
      padding: 4px;
      font-size: 12px;
      margin-right: 5px;
      background-color: #e1f5f8;
      text-align: center;
      // line-height: 18px;
      border-radius: 2px;
      color: #76d1dc;
    }
    .price {
      margin-top: 6px;
      color: #fa7664;
      font-size: 12px;
      .count {
        font-size: 16px;
        font-weight: bolder;
        font-style: normal;
      }
    }
  }
}
</style>
